Prevent subclassing of gestures
authorMatthias Clasen <mclasen@redhat.com>
Tue, 6 May 2014 02:40:18 +0000 (22:40 -0400)
committerCarlos Garnacho <carlosg@gnome.org>
Fri, 23 May 2014 17:54:28 +0000 (19:54 +0200)
For now, at least. We do this by hiding the instance and
class structures in private headers.

31 files changed:
gtk/Makefile.am
gtk/gtkeventcontroller.c
gtk/gtkeventcontroller.h
gtk/gtkeventcontrollerprivate.h [new file with mode: 0644]
gtk/gtkgesture.c
gtk/gtkgesture.h
gtk/gtkgesturedrag.c
gtk/gtkgesturedrag.h
gtk/gtkgesturedragprivate.h [new file with mode: 0644]
gtk/gtkgesturelongpress.c
gtk/gtkgesturelongpress.h
gtk/gtkgesturelongpressprivate.h [new file with mode: 0644]
gtk/gtkgesturemultipress.c
gtk/gtkgesturemultipress.h
gtk/gtkgesturemultipressprivate.h [new file with mode: 0644]
gtk/gtkgesturepan.c
gtk/gtkgesturepan.h
gtk/gtkgesturepanprivate.h [new file with mode: 0644]
gtk/gtkgestureprivate.h
gtk/gtkgesturerotate.c
gtk/gtkgesturerotate.h
gtk/gtkgesturerotateprivate.h [new file with mode: 0644]
gtk/gtkgesturesingle.c
gtk/gtkgesturesingle.h
gtk/gtkgesturesingleprivate.h [new file with mode: 0644]
gtk/gtkgestureswipe.c
gtk/gtkgestureswipe.h
gtk/gtkgestureswipeprivate.h [new file with mode: 0644]
gtk/gtkgesturezoom.c
gtk/gtkgesturezoom.h
gtk/gtkgesturezoomprivate.h [new file with mode: 0644]

index 4fcd4ae771fef2fd1f529dac667348af9b005aed..7c3512757fd81691f443db0eebda9ea8fa918cc0 100644 (file)
@@ -503,6 +503,7 @@ gtk_private_h_sources =             \
        gtkcustompaperunixdialog.h \
        gtkdialogprivate.h      \
        gtkentryprivate.h       \
+       gtkeventcontrollerprivate.h     \
        gtkfilechooserembed.h   \
        gtkfilechooserentry.h   \
        gtkfilechooserprivate.h \
@@ -512,6 +513,13 @@ gtk_private_h_sources =            \
        gtkfontchooserprivate.h \
        gtkfontchooserutils.h   \
        gtkgestureprivate.h     \
+       gtkgesturedragprivate.h \
+       gtkgesturelongpressprivate.h    \
+       gtkgesturemultipressprivate.h   \
+       gtkgesturepanprivate.h  \
+       gtkgesturerotateprivate.h       \
+       gtkgestureswipeprivate.h        \
+       gtkgesturezoomprivate.h \
        gtkheaderbarprivate.h   \
        gtkhslaprivate.h        \
        gtkiconcache.h          \
index 49ea0a3d339654e676a646401d9ed00628b31fb1..a3dd64967b9b041dbe3ac4077e6757154e86a374 100644 (file)
@@ -39,7 +39,8 @@
  */
 
 #include "config.h"
-#include <gtk/gtkeventcontroller.h>
+#include "gtkeventcontroller.h"
+#include "gtkeventcontrollerprivate.h"
 #include "gtktypebuiltins.h"
 #include "gtkmarshalers.h"
 #include "gtkprivate.h"
index bbefe1ba83c1befe5eb98ece7f47fa2f969b73a1..db1fa57ca5bba23ecb937f6d9a56748d17d1737f 100644 (file)
@@ -40,22 +40,6 @@ G_BEGIN_DECLS
 #define GTK_IS_EVENT_CONTROLLER_CLASS(k)  (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_TYPE_EVENT_CONTROLLER))
 #define GTK_EVENT_CONTROLLER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_EVENT_CONTROLLER, GtkEventControllerClass))
 
-struct _GtkEventController
-{
-  GObject parent_instance;
-};
-
-struct _GtkEventControllerClass
-{
-  GObjectClass parent_class;
-
-  gboolean (* handle_event) (GtkEventController *controller,
-                             const GdkEvent     *event);
-  void     (* reset)        (GtkEventController *controller);
-
-  /*<private>*/
-  gpointer padding[10];
-};
 
 GDK_AVAILABLE_IN_3_14
 GType        gtk_event_controller_get_type       (void) G_GNUC_CONST;
diff --git a/gtk/gtkeventcontrollerprivate.h b/gtk/gtkeventcontrollerprivate.h
new file mode 100644 (file)
index 0000000..0fa3c55
--- /dev/null
@@ -0,0 +1,42 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_EVENT_CONTROLLER_PRIVATE_H__
+#define __GTK_EVENT_CONTROLLER_PRIVATE_H__
+
+#include "gtkeventcontroller.h"
+
+struct _GtkEventController
+{
+  GObject parent_instance;
+};
+
+struct _GtkEventControllerClass
+{
+  GObjectClass parent_class;
+
+  gboolean (* handle_event) (GtkEventController *controller,
+                             const GdkEvent     *event);
+  void     (* reset)        (GtkEventController *controller);
+
+  /*<private>*/
+  gpointer padding[10];
+};
+
+#endif /* __GTK_EVENT_CONTROLLER_PRIVATE_H__ */
index 8a18efc533175971ebd4cd2b34be39e428965a43..e1f03d8dd92f5605df267b0ff654698ac5aec89f 100644 (file)
@@ -87,7 +87,8 @@
  */
 
 #include "config.h"
-#include <gtk/gtkgesture.h>
+#include "gtkgesture.h"
+#include "gtkgestureprivate.h"
 #include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 #include "gtkmain.h"
index 762dde7ddb2820131c2d35a379ceef3ff39f2572..a478a4582601efcfa2e60a668d7303e56e9b4a51 100644 (file)
@@ -39,35 +39,6 @@ G_BEGIN_DECLS
 typedef struct _GtkGesture GtkGesture;
 typedef struct _GtkGestureClass GtkGestureClass;
 
-struct _GtkGesture
-{
-  GtkEventController parent_instance;
-};
-
-struct _GtkGestureClass
-{
-  GtkEventControllerClass parent_class;
-
-  gboolean (* check)  (GtkGesture       *gesture);
-
-  void     (* begin)  (GtkGesture       *gesture,
-                       GdkEventSequence *sequence);
-  void     (* update) (GtkGesture       *gesture,
-                       GdkEventSequence *sequence);
-  void     (* end)    (GtkGesture       *gesture,
-                       GdkEventSequence *sequence);
-
-  void     (* cancel) (GtkGesture       *gesture,
-                       GdkEventSequence *sequence);
-
-  void     (* sequence_state_changed) (GtkGesture            *gesture,
-                                       GdkEventSequence      *sequence,
-                                       GtkEventSequenceState  state);
-
-  /*< private >*/
-  gpointer padding[10];
-};
-
 GDK_AVAILABLE_IN_3_14
 GType       gtk_gesture_get_type             (void) G_GNUC_CONST;
 
index 82a79ff6a09a666c14fb8fa7e45e580a930cb4f5..dbcd9c3d31495f09fd904902110355bfa77d9348 100644 (file)
@@ -31,7 +31,8 @@
  * gtk_gesture_drag_get_start_point().
  */
 #include "config.h"
-#include <gtk/gtkgesturedrag.h>
+#include "gtkgesturedrag.h"
+#include "gtkgesturedragprivate.h"
 
 typedef struct _GtkGestureDragPrivate GtkGestureDragPrivate;
 typedef struct _EventData EventData;
index c2f76e6aaf0948e9db85ccbd37f084e8d7bcbf3d..be308eb6318285dcd61b06f85301c489c15baf3b 100644 (file)
@@ -38,28 +38,6 @@ G_BEGIN_DECLS
 typedef struct _GtkGestureDrag GtkGestureDrag;
 typedef struct _GtkGestureDragClass GtkGestureDragClass;
 
-struct _GtkGestureDrag
-{
-  GtkGestureSingle parent_instance;
-};
-
-struct _GtkGestureDragClass
-{
-  GtkGestureSingleClass parent_class;
-
-  void (* drag_begin)  (GtkGestureDrag *gesture,
-                        gdouble         start_x,
-                        gdouble         start_y);
-  void (* drag_update) (GtkGestureDrag *gesture,
-                        gdouble         offset_x,
-                        gdouble         offset_y);
-  void (* drag_end)    (GtkGestureDrag *gesture,
-                        gdouble         offset_x,
-                        gdouble         offset_y);
-  /*<private>*/
-  gpointer padding[10];
-};
-
 GDK_AVAILABLE_IN_3_14
 GType        gtk_gesture_drag_get_type          (void) G_GNUC_CONST;
 
diff --git a/gtk/gtkgesturedragprivate.h b/gtk/gtkgesturedragprivate.h
new file mode 100644 (file)
index 0000000..63edc7e
--- /dev/null
@@ -0,0 +1,47 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_DRAG_PRIVATE_H__
+#define __GTK_GESTURE_DRAG_PRIVATE_H__
+
+#include "gtkgesturesingleprivate.h"
+#include "gtkgesturedrag.h"
+
+struct _GtkGestureDrag
+{
+  GtkGestureSingle parent_instance;
+};
+
+struct _GtkGestureDragClass
+{
+  GtkGestureSingleClass parent_class;
+
+  void (* drag_begin)  (GtkGestureDrag *gesture,
+                        gdouble         start_x,
+                        gdouble         start_y);
+  void (* drag_update) (GtkGestureDrag *gesture,
+                        gdouble         offset_x,
+                        gdouble         offset_y);
+  void (* drag_end)    (GtkGestureDrag *gesture,
+                        gdouble         offset_x,
+                        gdouble         offset_y);
+  /*<private>*/
+  gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_DRAG_PRIVATE_H__ */
index 496807e788159cc957315a01e7c54b1eccd03619..38e83bd428d3dea43335f38d1ef824c7a6be284e 100644 (file)
  */
 
 #include "config.h"
-#include <gtk/gtk.h>
-#include <gtk/gtkgesturelongpress.h>
+#include "gtkgesturelongpress.h"
+#include "gtkgesturelongpressprivate.h"
 #include "gtkmarshalers.h"
+#include "gtkdnd.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
 
index d27f660fbc6d5883a9d587266a69f3ce6fb59d6f..6cdc755b22f317a1f9091231dc6efa1ffed77f30 100644 (file)
@@ -38,24 +38,6 @@ G_BEGIN_DECLS
 typedef struct _GtkGestureLongPress GtkGestureLongPress;
 typedef struct _GtkGestureLongPressClass GtkGestureLongPressClass;
 
-struct _GtkGestureLongPress
-{
-  GtkGestureSingle parent_instance;
-};
-
-struct _GtkGestureLongPressClass
-{
-  GtkGestureSingleClass parent_class;
-
-  void (* pressed)   (GtkGestureLongPress *gesture,
-                      gdouble              x,
-                      gdouble              y);
-  void (* cancelled) (GtkGestureLongPress *gesture);
-
-  /*< private >*/
-  gpointer padding[10];
-};
-
 GDK_AVAILABLE_IN_3_14
 GType        gtk_gesture_long_press_get_type   (void) G_GNUC_CONST;
 
diff --git a/gtk/gtkgesturelongpressprivate.h b/gtk/gtkgesturelongpressprivate.h
new file mode 100644 (file)
index 0000000..5b9aa88
--- /dev/null
@@ -0,0 +1,44 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_LONG_PRESS_PRIVATE_H__
+#define __GTK_GESTURE_LONG_PRESS_PRIVATE_H__
+
+#include "gtkgesturesingleprivate.h"
+#include "gtkgesturelongpress.h"
+
+struct _GtkGestureLongPress
+{
+  GtkGestureSingle parent_instance;
+};
+
+struct _GtkGestureLongPressClass
+{
+  GtkGestureSingleClass parent_class;
+
+  void (* pressed)   (GtkGestureLongPress *gesture,
+                      gdouble              x,
+                      gdouble              y);
+  void (* cancelled) (GtkGestureLongPress *gesture);
+
+  /*< private >*/
+  gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_LONG_PRESS_PRIVATE_H__ */
index cd2064abb5f05d4cad59e9b0bdbd70033b4cab19..0de8c999ab883c7b558369af7b84813758398f66 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "config.h"
 #include "gtkgesturemultipress.h"
+#include "gtkgesturemultipressprivate.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
 
index 3a5319ba625f0a23e3def6fe8eb775a8c3fb3fec..b1cc0219708a5e0a9254c326f5b7fded289b4fa9 100644 (file)
@@ -38,25 +38,6 @@ G_BEGIN_DECLS
 typedef struct _GtkGestureMultiPress GtkGestureMultiPress;
 typedef struct _GtkGestureMultiPressClass GtkGestureMultiPressClass;
 
-struct _GtkGestureMultiPress
-{
-  GtkGestureSingle parent_instance;
-};
-
-struct _GtkGestureMultiPressClass
-{
-  GtkGestureSingleClass parent_class;
-
-  gboolean (* pressed) (GtkGestureMultiPress *gesture,
-                        gint                  n_press,
-                        gdouble               x,
-                        gdouble               y);
-  void     (* stopped) (GtkGestureMultiPress *gesture);
-
-  /*<private>*/
-  gpointer padding[10];
-};
-
 GDK_AVAILABLE_IN_3_14
 GType        gtk_gesture_multi_press_get_type (void) G_GNUC_CONST;
 
diff --git a/gtk/gtkgesturemultipressprivate.h b/gtk/gtkgesturemultipressprivate.h
new file mode 100644 (file)
index 0000000..58d400d
--- /dev/null
@@ -0,0 +1,44 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2014 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_MULTI_PRESS_PRIVATE_H__
+#define __GTK_GESTURE_MULTI_PRESS_PRIVATE_H__
+
+#include "gtkgesturesingleprivate.h"
+#include "gtkgesturemultipress.h"
+
+struct _GtkGestureMultiPress
+{
+  GtkGestureSingle parent_instance;
+};
+
+struct _GtkGestureMultiPressClass
+{
+  GtkGestureSingleClass parent_class;
+
+  gboolean (* pressed) (GtkGestureMultiPress *gesture,
+                        gint                  n_press,
+                        gdouble               x,
+                        gdouble               y);
+  void     (* stopped) (GtkGestureMultiPress *gesture);
+
+  /*<private>*/
+  gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_MULTI_PRESS_PRIVATE_H__ */
index 19d4f25bb6f3ff37776602a3a9e4c6e379825910..a4e79176b1faa322c20a1ce49701fc099e255290 100644 (file)
@@ -39,7 +39,8 @@
  */
 
 #include "config.h"
-#include <gtk/gtkgesturepan.h>
+#include "gtkgesturepan.h"
+#include "gtkgesturepanprivate.h"
 #include "gtktypebuiltins.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
index fdbde4e250cd7d2efea55297992305cfc2276454..6cd385617ca14f762387dcfc1f38ff1beadf6a4a 100644 (file)
@@ -38,23 +38,6 @@ G_BEGIN_DECLS
 typedef struct _GtkGesturePan GtkGesturePan;
 typedef struct _GtkGesturePanClass GtkGesturePanClass;
 
-struct _GtkGesturePan
-{
-  GtkGestureDrag parent_instance;
-};
-
-struct _GtkGesturePanClass
-{
-  GtkGestureDragClass parent_class;
-
-  void (* pan) (GtkGesturePan *gesture,
-                GtkPanDirection direction,
-                gdouble         offset);
-
-  /*< private >*/
-  gpointer padding[10];
-};
-
 GDK_AVAILABLE_IN_3_14
 GType             gtk_gesture_pan_get_type        (void) G_GNUC_CONST;
 
diff --git a/gtk/gtkgesturepanprivate.h b/gtk/gtkgesturepanprivate.h
new file mode 100644 (file)
index 0000000..7090caa
--- /dev/null
@@ -0,0 +1,42 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_PAN_PRIVATE_H__
+#define __GTK_GESTURE_PAN_PRIVATE_H__
+
+#include "gtkgesturedragprivate.h"
+#include "gtkgesturepan.h"
+
+struct _GtkGesturePan
+{
+  GtkGestureDrag parent_instance;
+};
+
+struct _GtkGesturePanClass
+{
+  GtkGestureDragClass parent_class;
+
+  void (* pan) (GtkGesturePan *gesture,
+                GtkPanDirection direction,
+                gdouble         offset);
+
+  /*< private >*/
+  gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_PAN_PRIVATE_H__ */
index ae4a9c44e76f6ad3ba4a39418f70ec3d2df79c40..fb3ae7d0370025aab04c432fffdbd8d50f5f9585 100644 (file)
  *
  * Author(s): Carlos Garnacho <carlosg@gnome.org>
  */
-
 #ifndef __GTK_GESTURE_PRIVATE_H__
 #define __GTK_GESTURE_PRIVATE_H__
 
+#include "gtkeventcontrollerprivate.h"
 #include "gtkgesture.h"
 
+struct _GtkGesture
+{
+  GtkEventController parent_instance;
+};
+
+struct _GtkGestureClass
+{
+  GtkEventControllerClass parent_class;
+
+  gboolean (* check)  (GtkGesture       *gesture);
+
+  void     (* begin)  (GtkGesture       *gesture,
+                       GdkEventSequence *sequence);
+  void     (* update) (GtkGesture       *gesture,
+                       GdkEventSequence *sequence);
+  void     (* end)    (GtkGesture       *gesture,
+                       GdkEventSequence *sequence);
+
+  void     (* cancel) (GtkGesture       *gesture,
+                       GdkEventSequence *sequence);
+
+  void     (* sequence_state_changed) (GtkGesture            *gesture,
+                                       GdkEventSequence      *sequence,
+                                       GtkEventSequenceState  state);
+
+  /*< private >*/
+  gpointer padding[10];
+};
+
+
 G_BEGIN_DECLS
 
 gboolean _gtk_gesture_handled_sequence_press (GtkGesture       *gesture,
                                               GdkEventSequence *sequence);
 
 gboolean _gtk_gesture_get_pointer_emulating_sequence
-                                             (GtkGesture        *gesture,
-                                              GdkEventSequence **sequence);
+                                                (GtkGesture        *gesture,
+                                                 GdkEventSequence **sequence);
 
 G_END_DECLS
 
index 53d0923d079603fa87616a365fa7d6b1cace4ad0..952129878f9249e6538caa5cc8075ccd42c23066 100644 (file)
@@ -31,7 +31,8 @@
 
 #include "config.h"
 #include <math.h>
-#include <gtk/gtkgesturerotate.h>
+#include "gtkgesturerotate.h"
+#include "gtkgesturerotateprivate.h"
 #include "gtkmarshalers.h"
 
 typedef struct _GtkGestureRotatePrivate GtkGestureRotatePrivate;
index fc61470efc2ae9f5dfae35a9147dd54fe25a4d37..803355d053a5560bf8488514c5f157ba2e31f2fc 100644 (file)
@@ -39,22 +39,6 @@ G_BEGIN_DECLS
 typedef struct _GtkGestureRotate GtkGestureRotate;
 typedef struct _GtkGestureRotateClass GtkGestureRotateClass;
 
-struct _GtkGestureRotate
-{
-  GtkGesture parent_instance;
-};
-
-struct _GtkGestureRotateClass
-{
-  GtkGestureClass parent_class;
-
-  void (* angle_changed) (GtkGestureRotate *gesture,
-                          gdouble           angle,
-                          gdouble           delta);
-  /*< private >*/
-  gpointer padding[10];
-};
-
 GDK_AVAILABLE_IN_3_14
 GType        gtk_gesture_rotate_get_type        (void) G_GNUC_CONST;
 
diff --git a/gtk/gtkgesturerotateprivate.h b/gtk/gtkgesturerotateprivate.h
new file mode 100644 (file)
index 0000000..12c9870
--- /dev/null
@@ -0,0 +1,42 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_ROTATE_PRIVATE_H__
+#define __GTK_GESTURE_ROTATE_PRIVATE_H__
+
+#include "gtkgestureprivate.h"
+#include "gtkgesturerotate.h"
+
+struct _GtkGestureRotate
+{
+  GtkGesture parent_instance;
+};
+
+struct _GtkGestureRotateClass
+{
+  GtkGestureClass parent_class;
+
+  void (* angle_changed) (GtkGestureRotate *gesture,
+                          gdouble           angle,
+                          gdouble           delta);
+  /*< private >*/
+  gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_ROTATE_PRIVATE_H__ */
index c443a34d5664b72f13c24ea7732c9713346e41e0..3e8b9c3ec63728fb0c0626679de3f3b1d5ef7722 100644 (file)
@@ -35,7 +35,8 @@
  */
 
 #include "config.h"
-#include <gtk/gtkgesturesingle.h>
+#include "gtkgesturesingle.h"
+#include "gtkgesturesingleprivate.h"
 #include "gtkprivate.h"
 #include "gtkintl.h"
 
index a8a5a51d442f26302b9c460d42f7232672f35a7d..fb4bce9cd5401e5cfa6da3cdb9a4fa0f9ad08457 100644 (file)
@@ -39,19 +39,6 @@ G_BEGIN_DECLS
 typedef struct _GtkGestureSingle GtkGestureSingle;
 typedef struct _GtkGestureSingleClass GtkGestureSingleClass;
 
-struct _GtkGestureSingle
-{
-  GtkGesture parent_instance;
-};
-
-struct _GtkGestureSingleClass
-{
-  GtkGestureClass parent_class;
-
-  /*< private >*/
-  gpointer padding[10];
-};
-
 GDK_AVAILABLE_IN_3_14
 GType       gtk_gesture_single_get_type       (void) G_GNUC_CONST;
 
diff --git a/gtk/gtkgesturesingleprivate.h b/gtk/gtkgesturesingleprivate.h
new file mode 100644 (file)
index 0000000..34b905f
--- /dev/null
@@ -0,0 +1,40 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+
+#ifndef __GTK_GESTURE_SINGLE_PRIVATE_H__
+#define __GTK_GESTURE_SINGLE_PRIVATE_H__
+
+#include "gtkgestureprivate.h"
+#include "gtkgesturesingle.h"
+
+struct _GtkGestureSingle
+{
+  GtkGesture parent_instance;
+};
+
+struct _GtkGestureSingleClass
+{
+  GtkGestureClass parent_class;
+
+  /*< private >*/
+  gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_SINGLE_PRIVATE_H__ */
index ea0b2478a80323b8c37fb54f0effdfeacfbd69df..c322566b59e56f5e7b8223de5fc4022673cc107e 100644 (file)
@@ -36,7 +36,8 @@
  */
 
 #include "config.h"
-#include <gtk/gtkgestureswipe.h>
+#include "gtkgestureswipe.h"
+#include "gtkgestureswipeprivate.h"
 #include "gtkmarshalers.h"
 
 #define CAPTURE_THRESHOLD_MS 150
index fec6132c5fd5ddbe4653a2a066d7e1d1f186e86b..433fde890667655c24ac4d73e7533a5ec0aeada4 100644 (file)
@@ -39,23 +39,6 @@ G_BEGIN_DECLS
 typedef struct _GtkGestureSwipe GtkGestureSwipe;
 typedef struct _GtkGestureSwipeClass GtkGestureSwipeClass;
 
-struct _GtkGestureSwipe
-{
-  GtkGestureSingle parent_instance;
-};
-
-struct _GtkGestureSwipeClass
-{
-  GtkGestureSingleClass parent_class;
-
-  void (* swipe) (GtkGestureSwipe *gesture,
-                  gdouble          velocity_x,
-                  gdouble          velocity_y);
-
-  /*< private >*/
-  gpointer padding[10];
-};
-
 GDK_AVAILABLE_IN_3_14
 GType        gtk_gesture_swipe_get_type  (void) G_GNUC_CONST;
 
diff --git a/gtk/gtkgestureswipeprivate.h b/gtk/gtkgestureswipeprivate.h
new file mode 100644 (file)
index 0000000..660ee3a
--- /dev/null
@@ -0,0 +1,43 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_SWIPE_PRIVATE_H__
+#define __GTK_GESTURE_SWIPE_PRIVATE_H__
+
+#include "gtkgesturesingleprivate.h"
+#include "gtkgestureswipe.h"
+
+struct _GtkGestureSwipe
+{
+  GtkGestureSingle parent_instance;
+};
+
+struct _GtkGestureSwipeClass
+{
+  GtkGestureSingleClass parent_class;
+
+  void (* swipe) (GtkGestureSwipe *gesture,
+                  gdouble          velocity_x,
+                  gdouble          velocity_y);
+
+  /*< private >*/
+  gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_SWIPE_PRIVATE_H__ */
index 6899b85b438abe04948b1e67165655c24b2f1d5d..a300366a364524d7c22809875e4d4d2586662879 100644 (file)
@@ -32,7 +32,8 @@
 
 #include "config.h"
 #include <math.h>
-#include <gtk/gtkgesturezoom.h>
+#include "gtkgesturezoom.h"
+#include "gtkgesturezoomprivate.h"
 
 typedef struct _GtkGestureZoomPrivate GtkGestureZoomPrivate;
 
index 16a03b037018a45f708f78debb82e8c93776e818..5ab2f4fe4e6c4c42d304c1df067de279668ffd54 100644 (file)
@@ -39,21 +39,6 @@ G_BEGIN_DECLS
 typedef struct _GtkGestureZoom GtkGestureZoom;
 typedef struct _GtkGestureZoomClass GtkGestureZoomClass;
 
-struct _GtkGestureZoom
-{
-  GtkGesture parent_instance;
-};
-
-struct _GtkGestureZoomClass
-{
-  GtkGestureClass parent_class;
-
-  void (* scale_changed) (GtkGestureZoom *gesture,
-                          gdouble         scale);
-  /*< private >*/
-  gpointer padding[10];
-};
-
 GDK_AVAILABLE_IN_3_14
 GType        gtk_gesture_zoom_get_type        (void) G_GNUC_CONST;
 
diff --git a/gtk/gtkgesturezoomprivate.h b/gtk/gtkgesturezoomprivate.h
new file mode 100644 (file)
index 0000000..9935c09
--- /dev/null
@@ -0,0 +1,41 @@
+/* GTK - The GIMP Toolkit
+ * Copyright (C) 2012, One Laptop Per Child.
+ * Copyright (C) 2014, Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author(s): Carlos Garnacho <carlosg@gnome.org>
+ */
+#ifndef __GTK_GESTURE_ZOOM_PRIVATE_H__
+#define __GTK_GESTURE_ZOOM_PRIVATE_H__
+
+#include "gtkgestureprivate.h"
+#include "gtkgesturezoom.h"
+
+struct _GtkGestureZoom
+{
+  GtkGesture parent_instance;
+};
+
+struct _GtkGestureZoomClass
+{
+  GtkGestureClass parent_class;
+
+  void (* scale_changed) (GtkGestureZoom *gesture,
+                          gdouble         scale);
+  /*< private >*/
+  gpointer padding[10];
+};
+
+#endif /* __GTK_GESTURE_ZOOM_PRIVATE_H__ */